<?php


/*
* Copyright (c) 2008-2016 vip.com, All Rights Reserved.
*
* Powered by com.vip.osp.osp-idlc-2.5.11.
*
*/

namespace com\vip\xstore\wop\inner\wm\service;

class PoReportModel {
	
	static $_TSPEC;
	public $wopPoId = null;
	public $warehouseCode = null;
	public $itemCode = null;
	public $itemName = null;
	public $brandCode = null;
	public $systemPoNo = null;
	public $clientPoNo = null;
	public $status = null;
	public $totalQty = null;
	public $iqcQty = null;
	public $warehousingTime = null;
	public $createdDtmLoc = null;
	public $startOnRacksTime = null;
	public $vendorCode = null;
	public $shelvesQty = null;
	public $operTime = null;
	public $firstIqcTime = null;
	public $receiptClosedTime = null;
	
	public function __construct($vals=null){
		
		if (!isset(self::$_TSPEC)){
			
			self::$_TSPEC = array(
			1 => array(
			'var' => 'wopPoId'
			),
			2 => array(
			'var' => 'warehouseCode'
			),
			3 => array(
			'var' => 'itemCode'
			),
			4 => array(
			'var' => 'itemName'
			),
			5 => array(
			'var' => 'brandCode'
			),
			6 => array(
			'var' => 'systemPoNo'
			),
			7 => array(
			'var' => 'clientPoNo'
			),
			8 => array(
			'var' => 'status'
			),
			9 => array(
			'var' => 'totalQty'
			),
			10 => array(
			'var' => 'iqcQty'
			),
			11 => array(
			'var' => 'warehousingTime'
			),
			12 => array(
			'var' => 'createdDtmLoc'
			),
			13 => array(
			'var' => 'startOnRacksTime'
			),
			14 => array(
			'var' => 'vendorCode'
			),
			15 => array(
			'var' => 'shelvesQty'
			),
			16 => array(
			'var' => 'operTime'
			),
			17 => array(
			'var' => 'firstIqcTime'
			),
			18 => array(
			'var' => 'receiptClosedTime'
			),
			
			);
			
		}
		
		if (is_array($vals)){
			
			
			if (isset($vals['wopPoId'])){
				
				$this->wopPoId = $vals['wopPoId'];
			}
			
			
			if (isset($vals['warehouseCode'])){
				
				$this->warehouseCode = $vals['warehouseCode'];
			}
			
			
			if (isset($vals['itemCode'])){
				
				$this->itemCode = $vals['itemCode'];
			}
			
			
			if (isset($vals['itemName'])){
				
				$this->itemName = $vals['itemName'];
			}
			
			
			if (isset($vals['brandCode'])){
				
				$this->brandCode = $vals['brandCode'];
			}
			
			
			if (isset($vals['systemPoNo'])){
				
				$this->systemPoNo = $vals['systemPoNo'];
			}
			
			
			if (isset($vals['clientPoNo'])){
				
				$this->clientPoNo = $vals['clientPoNo'];
			}
			
			
			if (isset($vals['status'])){
				
				$this->status = $vals['status'];
			}
			
			
			if (isset($vals['totalQty'])){
				
				$this->totalQty = $vals['totalQty'];
			}
			
			
			if (isset($vals['iqcQty'])){
				
				$this->iqcQty = $vals['iqcQty'];
			}
			
			
			if (isset($vals['warehousingTime'])){
				
				$this->warehousingTime = $vals['warehousingTime'];
			}
			
			
			if (isset($vals['createdDtmLoc'])){
				
				$this->createdDtmLoc = $vals['createdDtmLoc'];
			}
			
			
			if (isset($vals['startOnRacksTime'])){
				
				$this->startOnRacksTime = $vals['startOnRacksTime'];
			}
			
			
			if (isset($vals['vendorCode'])){
				
				$this->vendorCode = $vals['vendorCode'];
			}
			
			
			if (isset($vals['shelvesQty'])){
				
				$this->shelvesQty = $vals['shelvesQty'];
			}
			
			
			if (isset($vals['operTime'])){
				
				$this->operTime = $vals['operTime'];
			}
			
			
			if (isset($vals['firstIqcTime'])){
				
				$this->firstIqcTime = $vals['firstIqcTime'];
			}
			
			
			if (isset($vals['receiptClosedTime'])){
				
				$this->receiptClosedTime = $vals['receiptClosedTime'];
			}
			
			
		}
		
	}
	
	
	public function getName(){
		
		return 'PoReportModel';
	}
	
	public function read($input){
		
		$input->readStructBegin();
		while(true){
			
			$schemeField = $input->readFieldBegin();
			if ($schemeField == null) break;
			$needSkip = true;
			
			
			if ("wopPoId" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->wopPoId); 
				
			}
			
			
			
			
			if ("warehouseCode" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->warehouseCode);
				
			}
			
			
			
			
			if ("itemCode" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->itemCode);
				
			}
			
			
			
			
			if ("itemName" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->itemName);
				
			}
			
			
			
			
			if ("brandCode" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->brandCode);
				
			}
			
			
			
			
			if ("systemPoNo" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->systemPoNo);
				
			}
			
			
			
			
			if ("clientPoNo" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->clientPoNo);
				
			}
			
			
			
			
			if ("status" == $schemeField){
				
				$needSkip = false;
				$input->readByte($this->status); 
				
			}
			
			
			
			
			if ("totalQty" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->totalQty); 
				
			}
			
			
			
			
			if ("iqcQty" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->iqcQty); 
				
			}
			
			
			
			
			if ("warehousingTime" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->warehousingTime);
				
			}
			
			
			
			
			if ("createdDtmLoc" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->createdDtmLoc);
				
			}
			
			
			
			
			if ("startOnRacksTime" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->startOnRacksTime);
				
			}
			
			
			
			
			if ("vendorCode" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->vendorCode);
				
			}
			
			
			
			
			if ("shelvesQty" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->shelvesQty); 
				
			}
			
			
			
			
			if ("operTime" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->operTime); 
				
			}
			
			
			
			
			if ("firstIqcTime" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->firstIqcTime);
				
			}
			
			
			
			
			if ("receiptClosedTime" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->receiptClosedTime);
				
			}
			
			
			
			if($needSkip){
				
				\Osp\Protocol\ProtocolUtil::skip($input);
			}
			
			$input->readFieldEnd();
		}
		
		$input->readStructEnd();
		
		
		
	}
	
	public function write($output){
		
		$xfer = 0;
		$xfer += $output->writeStructBegin();
		
		if($this->wopPoId !== null) {
			
			$xfer += $output->writeFieldBegin('wopPoId');
			$xfer += $output->writeI64($this->wopPoId);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->warehouseCode !== null) {
			
			$xfer += $output->writeFieldBegin('warehouseCode');
			$xfer += $output->writeString($this->warehouseCode);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->itemCode !== null) {
			
			$xfer += $output->writeFieldBegin('itemCode');
			$xfer += $output->writeString($this->itemCode);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->itemName !== null) {
			
			$xfer += $output->writeFieldBegin('itemName');
			$xfer += $output->writeString($this->itemName);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->brandCode !== null) {
			
			$xfer += $output->writeFieldBegin('brandCode');
			$xfer += $output->writeString($this->brandCode);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->systemPoNo !== null) {
			
			$xfer += $output->writeFieldBegin('systemPoNo');
			$xfer += $output->writeString($this->systemPoNo);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->clientPoNo !== null) {
			
			$xfer += $output->writeFieldBegin('clientPoNo');
			$xfer += $output->writeString($this->clientPoNo);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->status !== null) {
			
			$xfer += $output->writeFieldBegin('status');
			$xfer += $output->writeByte($this->status);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->totalQty !== null) {
			
			$xfer += $output->writeFieldBegin('totalQty');
			$xfer += $output->writeI64($this->totalQty);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->iqcQty !== null) {
			
			$xfer += $output->writeFieldBegin('iqcQty');
			$xfer += $output->writeI64($this->iqcQty);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->warehousingTime !== null) {
			
			$xfer += $output->writeFieldBegin('warehousingTime');
			$xfer += $output->writeI64($this->warehousingTime);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->createdDtmLoc !== null) {
			
			$xfer += $output->writeFieldBegin('createdDtmLoc');
			$xfer += $output->writeI64($this->createdDtmLoc);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->startOnRacksTime !== null) {
			
			$xfer += $output->writeFieldBegin('startOnRacksTime');
			$xfer += $output->writeString($this->startOnRacksTime);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->vendorCode !== null) {
			
			$xfer += $output->writeFieldBegin('vendorCode');
			$xfer += $output->writeString($this->vendorCode);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->shelvesQty !== null) {
			
			$xfer += $output->writeFieldBegin('shelvesQty');
			$xfer += $output->writeI64($this->shelvesQty);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->operTime !== null) {
			
			$xfer += $output->writeFieldBegin('operTime');
			$xfer += $output->writeI64($this->operTime);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->firstIqcTime !== null) {
			
			$xfer += $output->writeFieldBegin('firstIqcTime');
			$xfer += $output->writeI64($this->firstIqcTime);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->receiptClosedTime !== null) {
			
			$xfer += $output->writeFieldBegin('receiptClosedTime');
			$xfer += $output->writeI64($this->receiptClosedTime);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		$xfer += $output->writeFieldStop();
		$xfer += $output->writeStructEnd();
		return $xfer;
	}
	
}

?>